program guru
	implicit none
	include 'fftw3.f'
	integer, parameter:: N = 6
	double precision:: arr2din(N,3), arr2dout(N, 3)
	integer:: DimsN, DimsIs, DimsOs
	integer:: HowmanyDimsN, HowmanyDimsIs, HowmanyDimsOs
	integer:: plan
	integer:: i, j, k
	DimsN = N
	DimsIS = 1
	DimsOs = 1
	HowmanyDimsN = 3
	HowmanyDimsIs = N
	HowmanyDimsOs = N
	do i = 1, N
		arr2din(i, 1) = dble(i)
		arr2din(i, 2) = dble(i)
		arr2din(i, 3) = dble(i)
	end do
	call dfftw_plan_guru_r2r( plan, 1, DimsN, DimsIs, DimsOs, 1, HowmanyDimsN, &
		HowmanyDimsIs, HowmanyDimsOs, arr2din, arr2dout, FFTW_R2HC, FFTW_ESTIMATE )
	call dfftw_execute_r2r( plan, arr2din, arr2dout )
	call dfftw_destroy_plan( plan )
	print *, arr2dout
	stop
end program
